choosing Cafe location based on NYC Airbnb data<\h1><\center>

Import libraries

Process shooting data

Import and process Airbnb dataset

Almost 39k location, We can reduce the number by doing some cleaning

Make a dataframe that contains polygons corners & centers and corresponding neighborhood name

Match each Airbnb with it's neighborhood name from the geojson map to make sure names are exactly same using polygons

Group Airbnb location by neighborhoods

Create a Choropleth map to visualize the distribution of Airbnb in NYC

Black regions are the regions that does not have any Airbnb meet the criteria, Staten Island and Bronx broughts does not have any Airbnb meets the criteria
It can seen that most of Airbnb are in Manhannten and Broklyn, so let us see how many in each state
As expected, only 3 neighborhoods have Airbnb location with our criteria.
We will drop Queens borough since it does not have high potential
We started with about 39k Airbnb location, and process these locations until we end-up with 4984

Process NYC neighborhoods venus

We have 2 options to find the location of each neighbohood

  1. Using geocoder
  2. Using Polygons centoid
option 1
option 2
Update the map

Foursquare credential and version

Please write your own Foursquare Credentials, I will not make mine availble

Exploring NYC Neighborhoods venus

Depending on your neighborhoods number, this might take time, so I visualize the name of neighborhood to make sure it's working

Create one-hot encoder from Venue Category column

Group one_hot data by neighboors to get each neighborhood data

Getting the most common venus for each neighborhood

After getting top venus for each neighborhood we must add the number of Airbnb locations and sort the data

Let us see the exact number of cofes/coffee shops

We need to know about the venus in our dataframe

This is a premium call, in my case I have 500 calls per day only, check your account type and try to make your dataset size within the range of the calls

I don't want to loose the id column, but visualizing it is confusing so I will create new dataset

We can visualize the data in a more suitable way
We can add more creiteria in our results

Discussion

Conclusions

We were able to narrow the possible locations for opening new cafe using Airbnb data and Foursquare API. The last descision for the location will depend on the budget, the type of cafe and the business plan